home *** CD-ROM | disk | FTP | other *** search
- Path: news.mira.net.au!news
- From: davidw@werple.net.au (David White)
- Newsgroups: comp.lang.c++
- Subject: Re: polymorphism and style
- Date: 4 Mar 1996 20:21:16 +1100
- Organization: Werple Internet, Melbourne
- Message-ID: <4hecmc$qhb@werple.net.au>
- References: <4gr4ur$n13@alpha.pcix.com> <DnI6II.KMt@news.arco.com> <4h4h3h$6ur@brtph500.bnr.ca> <4has16$cge@werple.net.au> <4hav3b$m26@news2.delphi.com>
- NNTP-Posting-Host: werple.mira.net.au
-
- I agree with all your comments, except that I suspect the necessary
- requirement of downcasts depends to a large degree on the application. In
- one application in particular, I have to deal with much of the type
- information not being known until run time. It doesn't have a lot of
- downcasting, but what it has usually results from collections of pointers
- to objects, often read from disk, which can exhibit most of their
- behaviour by accessing the base class only, but occasionally some
- derived-class operations, inappropriate for the base class, need to be
- called upon. Of course, this doesn't mean it couldn't be re-designed
- without almost no downcasting, but I believe the general-purpose nature of
- the present design, despite the downcasting, is overall an advantage.
-
- David White
- davidw@werple.mira.net.au
-